Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

retrieve Username (using vbscript in Notes)
~Fred Chufookonyoden 3.Dec.03 01:01 PM a Web browser
Domino Designer 6.0.1 CF2 Windows XP


Hello,

I don't know how to use vbscript in Notes.
But you can retrieve the username using the Windows API. The following example works on a Windows 2000 Workstation and I hope that MS hasn't changed the Syntax of the API.
You have to declare the function in the declaration section of your agent.
For example:
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (Byval lpBuffer As String, nSize As Long) As Long

Then you can use the function in your agent. Like this:
Sub Initialize
Dim RetVal As Long
Dim Buffer As String * 255
Dim UserName As String

RetVal = GetUserName(Buffer, Len(Buffer))

If RetVal <> 0 Then
Msgbox Buffer
End If
End Sub

Hope it will work for Win XP, too.

Carsten




using vbscript in Notes (~Kirk Nimweplop... 3.Dec.03)
. . retrieve Username (using vbscript i... (~Fred Chufookon... 3.Dec.03)
. . I was suggesting ... (WAS: using vb... (~Delores Dwonic... 3.Dec.03)
. . RE: using vbscript in Notes (~Chloe Bubregen... 3.Dec.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS